package com.liug.droidsmall2.utils.net;

import retrofit2.Retrofit;
import retrofit2.adapter.rxjava.RxJavaCallAdapterFactory;
import retrofit2.converter.gson.GsonConverterFactory;
import retrofit2.converter.simplexml.SimpleXmlConverterFactory;

/**
 * Created by LG on 2018/7/31.
 */

public class RetrofitUtils {
    public static Retrofit init(){
        Retrofit retrofit = new Retrofit.Builder()
                .baseUrl("http://www.jrs2018.cn/index.php/")
                .addConverterFactory(GsonConverterFactory.create())
                .build();
     return retrofit;
    }


    public static Retrofit initWeather(){

        Retrofit retrofit = new Retrofit.Builder()
                .baseUrl("http://wthrcdn.etouch.cn/")
                .addConverterFactory(SimpleXmlConverterFactory.create())
                .addCallAdapterFactory(RxJavaCallAdapterFactory.create())
                .build();


     return retrofit;
    }


}
